{"id":1585,"date":"2018-05-11T18:42:03","date_gmt":"2018-05-11T16:42:03","guid":{"rendered":"http:\/\/yarogniew.net\/arduino\/?page_id=1585"},"modified":"2018-05-11T19:00:17","modified_gmt":"2018-05-11T17:00:17","slug":"phyton-3-proste-programy","status":"publish","type":"page","link":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/","title":{"rendered":"Phyton 3 &#8211; proste programy"},"content":{"rendered":"<p>\u22a5\u0179r\u00f3d\u0142o: <a href=\"http:\/\/python101.readthedocs.io\/pl\/latest\/podstawy\/przyklady\/przyklad00.html\">Python w przyk\u0142adach<\/a><\/p>\n<pre class=\"brush: python; light: false; title: Kod:; toolbar: true; notranslate\" title=\"Kod:\">\r\n#! \/usr\/bin\/env python3\r\n# -*- coding: utf-8 -*-\r\n\r\n# importujemy bibliotek\u0119 datetime\r\n\r\nimport datetime\r\n\r\n# deklarujemy i inicjalizujemy zmienne\r\n\r\npythonRok = 1989\r\n\r\n# sprawdzamy korzystaj\u0105c z biblioteki datetime\r\n# kt\u00f3ry mamy rok\r\n\r\nteraz = datetime.datetime.now()\r\n\r\naktRok = teraz.year\r\nprint(&quot;Mamy rok&quot;, aktRok, &quot;\\n&quot;)\r\n\r\n# obliczamy wiek Pythona\r\nwiekPythona = aktRok - pythonRok\r\n\r\n# pobieramy dane\r\nimie = input('Jak si\u0119 nazywasz? ')\r\nwiek = int(input('Ile masz lat? '))\r\n\r\n# wy\u015bwietlamy komunikaty\r\nprint(&quot;Witaj&quot;, imie)\r\nprint(&quot;M\u00f3w mi Python, mam&quot;, wiekPythona, &quot;lat.&quot;)\r\n\r\n# sprawdzamy ostatni\u0105 liter\u0119 imienia,\r\n#  UWAGA: litera w Python to string\r\n\r\nif imie&#x5B;-1] == &quot;a&quot;:\r\n    koncowka = &quot;a&quot;\r\nelse:\r\n    koncowka = &quot;y&quot;\r\n\r\n# instrukcja warunkowa, funkcja .format zast\u0119puj\u0105ca {} dan\u0105 w argumencie\r\n\r\nif wiek &gt; wiekPythona:\r\n    print('Jeste\u015b starsz{} ode mnie.'.format(koncowka))\r\nelse:\r\n    print('Jeste\u015b m\u0142odsz{} ode mnie.'.format(koncowka))\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u22a5\u0179r\u00f3d\u0142o: Python w przyk\u0142adach #! \/usr\/bin\/env python3 # -*- coding: utf-8 -*- # importujemy bibliotek\u0119 datetime import datetime # deklarujemy i inicjalizujemy zmienne pythonRok = 1989 # sprawdzamy korzystaj\u0105c z&#8230;<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":1588,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-1585","page","type-page","status-publish","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.8 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u22a5\u0179r\u00f3d\u0142o: Python w przyk\u0142adach [code lang=&quot;python&quot;] #! \/usr\/bin\/env python3 # -*- coding: utf-8 -*- # importujemy bibliotek\u0119 datetime import datetime # deklarujemy i inicjalizujemy zmienne pythonRok = 1989 # sprawdzamy korzystaj\u0105c z biblioteki datetime # kt\u00f3ry mamy rok teraz = datetime.datetime.now() aktRok = teraz.year print(&quot;Mamy rok&quot;, aktRok, &quot;\\n&quot;) # obliczamy wiek Pythona wiekPythona = aktRok\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.8\" \/>\n\t\t<meta property=\"og:locale\" content=\"pl_PL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Arduino dla strasznych lamer\u00f3w - www.arduino.net.pl\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Phyton 3 \u2013 proste programy - Arduino dla strasznych lamer\u00f3w\" \/>\n\t\t<meta property=\"og:description\" content=\"\u22a5\u0179r\u00f3d\u0142o: Python w przyk\u0142adach [code lang=&quot;python&quot;] #! \/usr\/bin\/env python3 # -*- coding: utf-8 -*- # importujemy bibliotek\u0119 datetime import datetime # deklarujemy i inicjalizujemy zmienne pythonRok = 1989 # sprawdzamy korzystaj\u0105c z biblioteki datetime # kt\u00f3ry mamy rok teraz = datetime.datetime.now() aktRok = teraz.year print(&quot;Mamy rok&quot;, aktRok, &quot;\\n&quot;) # obliczamy wiek Pythona wiekPythona = aktRok\" \/>\n\t\t<meta property=\"og:url\" content=\"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2018-05-11T16:42:03+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2018-05-11T17:00:17+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Phyton 3 \u2013 proste programy - Arduino dla strasznych lamer\u00f3w\" \/>\n\t\t<meta name=\"twitter:description\" content=\"\u22a5\u0179r\u00f3d\u0142o: Python w przyk\u0142adach [code lang=&quot;python&quot;] #! \/usr\/bin\/env python3 # -*- coding: utf-8 -*- # importujemy bibliotek\u0119 datetime import datetime # deklarujemy i inicjalizujemy zmienne pythonRok = 1989 # sprawdzamy korzystaj\u0105c z biblioteki datetime # kt\u00f3ry mamy rok teraz = datetime.datetime.now() aktRok = teraz.year print(&quot;Mamy rok&quot;, aktRok, &quot;\\n&quot;) # obliczamy wiek Pythona wiekPythona = aktRok\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/index.php\\\/python-3\\\/phyton-3-proste-programy\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/index.php\\\/python-3\\\/#listItem\",\"name\":\"PYTHON 3\"}},{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/index.php\\\/python-3\\\/#listItem\",\"position\":2,\"name\":\"PYTHON 3\",\"item\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/index.php\\\/python-3\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/index.php\\\/python-3\\\/phyton-3-proste-programy\\\/#listItem\",\"name\":\"Phyton 3 &#8211; proste programy\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/index.php\\\/python-3\\\/phyton-3-proste-programy\\\/#listItem\",\"position\":3,\"name\":\"Phyton 3 &#8211; proste programy\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/index.php\\\/python-3\\\/#listItem\",\"name\":\"PYTHON 3\"}}]},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/#person\",\"name\":\"yarogniew_anpl\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/index.php\\\/python-3\\\/phyton-3-proste-programy\\\/#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/daf42a0de5021721fc53447fe7cf000e09055bf4fb96ef98490902a9e4de3bf2?s=96&d=identicon&r=g\",\"width\":96,\"height\":96,\"caption\":\"yarogniew_anpl\"}},{\"@type\":\"WebPage\",\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/index.php\\\/python-3\\\/phyton-3-proste-programy\\\/#webpage\",\"url\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/index.php\\\/python-3\\\/phyton-3-proste-programy\\\/\",\"name\":\"Phyton 3 \\u2013 proste programy - Arduino dla strasznych lamer\\u00f3w\",\"description\":\"\\u22a5\\u0179r\\u00f3d\\u0142o: Python w przyk\\u0142adach [code lang=\\\"python\\\"] #! \\\/usr\\\/bin\\\/env python3 # -*- coding: utf-8 -*- # importujemy bibliotek\\u0119 datetime import datetime # deklarujemy i inicjalizujemy zmienne pythonRok = 1989 # sprawdzamy korzystaj\\u0105c z biblioteki datetime # kt\\u00f3ry mamy rok teraz = datetime.datetime.now() aktRok = teraz.year print(\\\"Mamy rok\\\", aktRok, \\\"\\\\n\\\") # obliczamy wiek Pythona wiekPythona = aktRok\",\"inLanguage\":\"pl-PL\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/#website\"},\"breadcrumb\":{\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/index.php\\\/python-3\\\/phyton-3-proste-programy\\\/#breadcrumblist\"},\"datePublished\":\"2018-05-11T18:42:03+02:00\",\"dateModified\":\"2018-05-11T19:00:17+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/#website\",\"url\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/\",\"name\":\"Arduino dla strasznych lamer\\u00f3w\",\"description\":\"www.arduino.net.pl\",\"inLanguage\":\"pl-PL\",\"publisher\":{\"@id\":\"http:\\\/\\\/adsl_zapas.dkonto.pl\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Phyton 3 \u2013 proste programy - Arduino dla strasznych lamer\u00f3w","description":"\u22a5\u0179r\u00f3d\u0142o: Python w przyk\u0142adach [code lang=\"python\"] #! \/usr\/bin\/env python3 # -*- coding: utf-8 -*- # importujemy bibliotek\u0119 datetime import datetime # deklarujemy i inicjalizujemy zmienne pythonRok = 1989 # sprawdzamy korzystaj\u0105c z biblioteki datetime # kt\u00f3ry mamy rok teraz = datetime.datetime.now() aktRok = teraz.year print(\"Mamy rok\", aktRok, \"\\n\") # obliczamy wiek Pythona wiekPythona = aktRok","canonical_url":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"http:\/\/adsl_zapas.dkonto.pl#listItem","position":1,"name":"Home","item":"http:\/\/adsl_zapas.dkonto.pl","nextItem":{"@type":"ListItem","@id":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/#listItem","name":"PYTHON 3"}},{"@type":"ListItem","@id":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/#listItem","position":2,"name":"PYTHON 3","item":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/","nextItem":{"@type":"ListItem","@id":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/#listItem","name":"Phyton 3 &#8211; proste programy"},"previousItem":{"@type":"ListItem","@id":"http:\/\/adsl_zapas.dkonto.pl#listItem","name":"Home"}},{"@type":"ListItem","@id":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/#listItem","position":3,"name":"Phyton 3 &#8211; proste programy","previousItem":{"@type":"ListItem","@id":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/#listItem","name":"PYTHON 3"}}]},{"@type":"Person","@id":"http:\/\/adsl_zapas.dkonto.pl\/#person","name":"yarogniew_anpl","image":{"@type":"ImageObject","@id":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/daf42a0de5021721fc53447fe7cf000e09055bf4fb96ef98490902a9e4de3bf2?s=96&d=identicon&r=g","width":96,"height":96,"caption":"yarogniew_anpl"}},{"@type":"WebPage","@id":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/#webpage","url":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/","name":"Phyton 3 \u2013 proste programy - Arduino dla strasznych lamer\u00f3w","description":"\u22a5\u0179r\u00f3d\u0142o: Python w przyk\u0142adach [code lang=\"python\"] #! \/usr\/bin\/env python3 # -*- coding: utf-8 -*- # importujemy bibliotek\u0119 datetime import datetime # deklarujemy i inicjalizujemy zmienne pythonRok = 1989 # sprawdzamy korzystaj\u0105c z biblioteki datetime # kt\u00f3ry mamy rok teraz = datetime.datetime.now() aktRok = teraz.year print(\"Mamy rok\", aktRok, \"\\n\") # obliczamy wiek Pythona wiekPythona = aktRok","inLanguage":"pl-PL","isPartOf":{"@id":"http:\/\/adsl_zapas.dkonto.pl\/#website"},"breadcrumb":{"@id":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/#breadcrumblist"},"datePublished":"2018-05-11T18:42:03+02:00","dateModified":"2018-05-11T19:00:17+02:00"},{"@type":"WebSite","@id":"http:\/\/adsl_zapas.dkonto.pl\/#website","url":"http:\/\/adsl_zapas.dkonto.pl\/","name":"Arduino dla strasznych lamer\u00f3w","description":"www.arduino.net.pl","inLanguage":"pl-PL","publisher":{"@id":"http:\/\/adsl_zapas.dkonto.pl\/#person"}}]},"og:locale":"pl_PL","og:site_name":"Arduino dla strasznych lamer\u00f3w - www.arduino.net.pl","og:type":"article","og:title":"Phyton 3 \u2013 proste programy - Arduino dla strasznych lamer\u00f3w","og:description":"\u22a5\u0179r\u00f3d\u0142o: Python w przyk\u0142adach [code lang=&quot;python&quot;] #! \/usr\/bin\/env python3 # -*- coding: utf-8 -*- # importujemy bibliotek\u0119 datetime import datetime # deklarujemy i inicjalizujemy zmienne pythonRok = 1989 # sprawdzamy korzystaj\u0105c z biblioteki datetime # kt\u00f3ry mamy rok teraz = datetime.datetime.now() aktRok = teraz.year print(&quot;Mamy rok&quot;, aktRok, &quot;\\n&quot;) # obliczamy wiek Pythona wiekPythona = aktRok","og:url":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/","article:published_time":"2018-05-11T16:42:03+00:00","article:modified_time":"2018-05-11T17:00:17+00:00","twitter:card":"summary_large_image","twitter:title":"Phyton 3 \u2013 proste programy - Arduino dla strasznych lamer\u00f3w","twitter:description":"\u22a5\u0179r\u00f3d\u0142o: Python w przyk\u0142adach [code lang=&quot;python&quot;] #! \/usr\/bin\/env python3 # -*- coding: utf-8 -*- # importujemy bibliotek\u0119 datetime import datetime # deklarujemy i inicjalizujemy zmienne pythonRok = 1989 # sprawdzamy korzystaj\u0105c z biblioteki datetime # kt\u00f3ry mamy rok teraz = datetime.datetime.now() aktRok = teraz.year print(&quot;Mamy rok&quot;, aktRok, &quot;\\n&quot;) # obliczamy wiek Pythona wiekPythona = aktRok"},"aioseo_meta_data":{"post_id":"1585","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2022-08-02 13:02:51","updated":"2025-07-03 11:23:57","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"http:\/\/adsl_zapas.dkonto.pl\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/\" title=\"PYTHON 3\">PYTHON 3<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tPhyton 3 \u2013 proste programy\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"http:\/\/adsl_zapas.dkonto.pl"},{"label":"PYTHON 3","link":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/"},{"label":"Phyton 3 &#8211; proste programy","link":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/python-3\/phyton-3-proste-programy\/"}],"_links":{"self":[{"href":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/wp-json\/wp\/v2\/pages\/1585","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/wp-json\/wp\/v2\/comments?post=1585"}],"version-history":[{"count":1,"href":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/wp-json\/wp\/v2\/pages\/1585\/revisions"}],"predecessor-version":[{"id":1586,"href":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/wp-json\/wp\/v2\/pages\/1585\/revisions\/1586"}],"up":[{"embeddable":true,"href":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/wp-json\/wp\/v2\/pages\/1588"}],"wp:attachment":[{"href":"http:\/\/adsl_zapas.dkonto.pl\/index.php\/wp-json\/wp\/v2\/media?parent=1585"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}